package com.lwj.liwanjia.utils;

import android.content.Context;
import android.util.DisplayMetrics;
import android.view.WindowManager;

/**
 * Created by Administrator on 2018/1/16.
 */

public class ImageSizeUtils {
    //获取放大后图片的高度
    public static int getImageHight(Context context, int imgWidth, int imgHeight) {
        WindowManager wm = (WindowManager) context
                .getSystemService(Context.WINDOW_SERVICE);
        DisplayMetrics dm = new DisplayMetrics();
        wm.getDefaultDisplay().getMetrics(dm);
        int width = dm.widthPixels;
        int height = dm.heightPixels;
        int bHeight =(width * imgHeight / imgWidth);
        return bHeight;
    }

}
